Method of compressing digital ink

ABSTRACT

A method of compressing a digital ink input is disclosed. The digital ink includes a sequence of strokes, each stroke being represented as a series of digital words representing x and y co-ordinates, the compressed digital ink data including, for each stroke, at least one reference co-ordinate expressed in absolute terms, with subsequent co-ordinates being expressed in terms of an offset from a co-ordinate, estimated using linear prediction, such that a given co-ordinate may be determined on the basis of the previous m co-ordinates as formula (I); where c i? are coefficients dependent on the nature of the digital ink, and a represents either an x or a y co-ordinate.  
                 α   ~     N     =       ∑     i   =   1     m            c   i          α     n   -   i                   (   I   )

TECHNICAL FIELD

[0001] The present invention relates to methods of compressing digitalink and in particular, to compression methods using linear predictiveencoding schemes.

BACKGROUND ART

[0002] The growth in use of portable pen-based computing devices, suchas PDAs, has resulted in an increased desire to process the input‘stroke’ data in time and data-storage efficient manner. Prior arttechniques involve translating the input stroke data, which is input viameans of a stylus tracing out a character on a suitable touchscreen,into computer-readable, or ASCII, text.

[0003] In this way, if a user enters handwritten data, it is generallystored in the form of plain ASCII text in the device's data store. Then,if the user wishes to perform a search for a word amongst that data, hemust enter the handwritten word, which is again translated, usingcharacter recognition techniques, into plain ASCII text to enable thecomputer to locate the stored word, which is then displayed in acomputer-generated typeface or font.

[0004] Increasingly, it is felt that the step of translating handwrittendata entries into ASCII text is an unnecessary step. However, it ispresently the most efficient way to store large amounts of data. This isbecause the storage of handwritten data as image files is prohibitivelymemory intensive. Even storing the strokes as a series of x-yco-ordinates can consume large amounts of memory.

[0005] Generally, digital ink is structured as a sequence of strokesthat begin when the pen device makes contact with a drawing surface andends when the pen device is lifted. Each stroke comprises a set ofsampled coordinates that define the movement of the pen whilst the penis in contact with the drawing surface.

[0006] As stated, the increasing use of pen computing and the emergenceof paper-based interfaces to networked computing resources hashighlighted the need for techniques to compress digital ink. This isillustrated in a press release by Anoto: “Anoto, Ericsson, and TimeManager Take Pen and Paper into the Digital Age with the AnotoTechnology”, 6^(th) April, 2000. Since written ink is a more expressiveand flexible format than text, it is desirable that pen-computingsystems support the storage, retrieval, and reproduction of raw digitalink. However, since digital ink representations of information are oftenfar larger than their corresponding traditional representation (e.g. thedigital ink representing handwriting is far larger than thecorresponding ASCII text), digital ink compression is needed to ensureefficient transmission and storage of this data type.

[0007] In the field of telephony, delta encoding is a known techniquefor the compression of telephone-quality speech signals. DifferentialPulse Code Modulation (DPCM) exploits the fact that most of the energyin a speech signal occurs at low frequencies, and thus given asufficiently high sample rate the difference between successive samplesis generally smaller than the magnitude of the samples themselves. Amore sophisticated compression scheme, Adaptive Differential Pulse CodeModulation (ADPCM) is used to compress 64 Kb/s speech signals to anumber of bit rates down to 16 Kb/s. This technique, defined in ITUstandard 0.726 (International Telecommunication Union (ITU), “40, 32,24, 16 Kbit/s Adaptive Differential Pulse Code Modulation (ADPCM)”,ITU-T Recommendation G. 726) adapts the magnitude of the delta step sizebased on a statistical analysis of a short-term frame of the speechsignal.

[0008] Similarly, linear predictive coding (LPC) has been used tocompress telephone-quality speech to very low bit-rates. Generally, LPCaudio compression is lossy and introduces significant distortion, anexample being the LPC-10e standard that produces poor-quality, syntheticsounding compressed speech at 2.4 Kb/s. More sophisticated compressionschemes based on LPC have been developed that produce much higherquality signals at correspondingly higher bit rates (e.g. theCode-Excited Linear Prediction (CELP) compression scheme described inITU standard G.723.1 (International Telecommunication Union (ITU), “DualRate Speech Coder for Multimedia Telecommunication Transmitting at 5.3and 6.3 Kbit/s”, ITU-T Recommendation G. 723.1).

[0009] U.S. Pat. No. 6,212,295 describes a procedure for thereconstruction of handwritten dynamics by “accumulating increments ofvalues that are some function of the original data”. The technique usesa non-linear function to accentuate the velocity component of theoriginal signal for use in a handwritten signature verification system.

[0010] A number of commercial vendors have developed products thatperform lossy digital ink compression. Communications IntelligenceCorporation offer a product called INKShrINK that “stores highresolution electronic ink for far less than a compressed image”. Theproduct offers six levels of optimization that offer a trade off betweensize and reconstructed image quality. Another ink compression schemebased on approximation using Bezier curves is described in the JOTstandard: Slate Corporation, “JOT—A Specification for an Ink Storage andInterchange Format”, May 1993.

[0011] These prior art documents indicate that an efficient andstraightforward compression scheme is required in order to capitalise onthe potential offered by digital ink. The present invention aims toaddress this problem.

DISCLOSURE OF INVENTION

[0012] The invention includes techniques for the streamable, loss-lesscompression of digital ink. Related work in the area is presented, alongwith a number of algorithms for the delta encoding and linear predictivecoding of digital ink. Compression results for the algorithms are given,along with a discussion on the worst-case behavior of the bestperforming compression scheme.

[0013] The focus of the invention is on compression of digital ink.Further, the compression techniques are designed to be streamable andutilize minimal memory and processing resources, making them suitablefor low-cost embedded environments. Embodiments of the invention mayallow for either loss-less or lossy compression, the distinction to bedetermined as an implementation feature.

[0014] According to a broad form of the present invention, there isprovided a method of compressing a digital ink input including asequence of strokes, each stroke being represented as a series ofdigital words representing x and y co-ordinates, the compressed digitalink data including, for each stroke, at least one reference co-ordinateexpressed in absolute terms, with subsequent co-ordinates beingexpressed in terms of an offset from a co-ordinate, estimated usinglinear prediction, such that a given co-ordinate may be determined onthe basis of the previous m co-ordinates as:${\overset{\sim}{\alpha}}_{n} = {\sum\limits_{i = 1}^{m}{c_{i}\alpha_{n - i}}}$

[0015] where c_(i) are coefficients selected to model characteristics ofthe digital ink, and α represents either an x or a y co-ordinate.

[0016] The x and y co-ordinates refer to a planar space in which xrepresents the direction of handwriting.

[0017] Preferably, m is 2, and a given co-ordinate may be defined:

α_(n) =C ₁α_(n−1) +C ₂α_(n−2)

[0018] Preferably, C₁>0 and C₂<0. These limits are empirically found tooffer acceptable performance.

[0019] Preferably, 1≦C₁≦3 and −2≦C₂≦1. These narrower ranges offerenhanced performance over the previously declared ranges.

[0020] Preferably, C₁=2 and C₂=−1. These values offer acceptableperformance, and as they are integer values, are quick and simple toimplement.

[0021] Alternatively, the coefficient values (C_(i)) for x co-ordinatesare different to the coefficients for y co-ordinates. Differentcoefficients to encode for x and y co-ordinates are preferable due tothe non-symmetry of most handwriting. For instance, there tends to alonger strokes in the y direction than in the x direction due to thetails on letters such as ‘y’, ‘g’, and letters such as ‘k’, ‘l’, ‘b’ and‘d’ having relatively long vertical elements.

[0022] Preferably, for x co-ordinates: C₁=1.857, C₂=−0.856, and for yco-ordinates: C₁=1.912, C₂=−0.913. These values are empirically found tooffer optimum performance.

[0023] Preferably, m is 3, and a given co-ordinate may be defined:

{umlaut over (α)}_(n) =c ₁α_(n−1) +c ₂α_(n−2) +c ₃α_(n−3)

[0024] Using three previous co-ordinates offers enhanced predictioncapabilities, and hence, improved encoding.

[0025] Preferably, C₁>0 and C₂<0 and C₃<1.

[0026] Preferably, the coefficient values (C_(i)) for x co-ordinates aredifferent to the coefficients for y co-ordinates.

[0027] Preferably, for x co-ordinates: C₁=1.799, C₂=−0.722, C₃=−0.078,and for y co-ordinates: C₁=2.009, C₂=−1.107, C₃=−0.098.

BRIEF DESCRIPTION OF FIGURES

[0028] The present invention should become apparent from the followingdescription, which is given by way of example only, of a preferred butnon-limiting embodiment thereof, described in connection with theaccompanying figures, wherein:

[0029]FIG. 1 illustrates a processor suitable for performing methodsaccording to embodiments of the present invention;

[0030]FIG. 2 shows a signal flow graph for a delta encoder according toan embodiment of the invention;

[0031]FIG. 3 shows a signal flow graph for an adaptive Huffman Delt aencoder according to an embodiment of the invention;

[0032]FIG. 4 shows a signal flow graph for a linear predictive encoderaccording to an embodiment of the invention;

[0033]FIG. 5 shows a histogram of the deltas derived from the digitalink in the training database, together with the corresponding entropyvalue;

[0034]FIG. 6 shows a histogram of the x deltas derived from the digitalink in the training database, together with the corresponding entropyvalue;

[0035]FIG. 7 shows a histogram of the y deltas derived from the digitalink in the training database, together with the corresponding entropyvalue;

[0036]FIG. 8 shows a histogram of the x residuals using linearprediction, together with the corresponding entropy value; and

[0037]FIG. 9 shows a histogram of the y residuals using linearprediction, together with the corresponding entropy value.

MODES FOR CARRYING OUT THE INVENTION

[0038] The following modes are described as applied to the writtendescription and appended claims in order to provide a more preciseunderstanding of the subject matter of the present invention.

[0039] The present invention provides several embodiments which providecompression of digital ink. In the figures, incorporated to illustratethe features of the present invention, like reference numerals are usedto identify like parts throughout the figures.

[0040] A preferred, but non-limiting, embodiment of the presentinvention is shown in FIG. 1.

[0041] The process can be performed using a processing system an exampleof which is shown in FIG. 1.

[0042] In particular, the processing system 10 generally includes atleast a processor 20, a memory 21, and an input device 22, such as agraphics tablet and/or keyboard, an output device 23, such as a display,coupled together via a bus 24 as shown. An external interface is alsoprovided as shown at 25, for coupling the processing system to a store11, such as a database.

[0043] In use, the processing system is adapted to allow data to bestored in and/or retrieved from the database 11. This allows theprocessor to receive data via the input, process the data using datastored in the store. This in turn allows the processing system toproduce a compressed version of the input digital ink data. From this,it will be appreciated that the processing system 10 may be any form ofprocessing system such as a computer, a laptop, server, specialisedhardware, or the like.

[0044] The following examples provide a more detailed outline of oneembodiment of the present invention. These examples are intended to bemerely illustrative and not limiting of the scope of the presentinvention.

[0045] In the description which follows, digital ink is represented asan array of strokes, each of which begins with a pen-down event andcontinues until the corresponding pen-up event. Points within thestrokes are stored as 32-bit X and Y coordinates sampled at 100 Hz.Other resolutions and sample rates are of course possible, with thesevalues being exemplary only. In trials, sample digital ink was collectedusing a Wacom digitizer, and includes a mixture of cursive handwriting,printed text, and hand-drawn images. The sample digital ink was dividedinto two disjoint databases, one used for training (where required), andthe other used for testing.

[0046] Unless otherwise specified, X and Y coordinates are encoded usingthe same procedure, so equations for the encoding and decoding of Ycoordinates can be derived mechanically from the equations given for theencoding and decoding of the X coordinates. Note that other inkrepresentations include additional information about the dynamics of astroke such as pen pressure and orientation. It is anticipated that thisinformation can be successfully compressed using the same or similartechniques as described below.

[0047] Delta Encoding

[0048] This part details the algorithms and experimental results ofdigital ink compression using delta encoding, and discusses the use ofentropy encoding for the compression of the delta codes.

[0049] Simple Delta Encoding

[0050] A simple digital ink compression scheme can be employed byobserving that the difference between successive points in an ink strokeis generally much less than the size of the point coordinatesthemselves. As a result, transmitting or storing the difference betweenindividual samples rather than the samples themselves will allowcompression of the digital ink stream. To encode the data, the firstpoint is transmitted with full precision (i.e. 32-bits), with eachsuccessive point encoded as a pair of X and Y offsets (that is, X and Ydeltas) from its predecessor:

Δx _(n) =x _(n) −x _(n−1)

[0051] Since the sample deltas are much smaller than the samplesthemselves, they can be encoded using fewer bits. To decode thecompressed stream:

x _(n) =x _(n−1) +Δx _(n)

[0052] The signal flow graph for delta encoding is given in FIG. 2.Using 16-bit delta encoding, the test database was compressed by afactor of 1.97 (49.24%), which is approximately the expected value giventhe overhead of array sizes and initial point transmission.

[0053] Adaptive Delta Encoding

[0054] Examination of the deltas derived during compression reveals thatthey can usually be encoded using far fewer bits than specified above.However, strokes containing high velocity segments (i.e. large changesin position between samples and thus large deltas) will require morebits for encoding. By measuring the dynamic range of the deltas within astroke, the optimal number of bits can be selected for delta encoding:

Δx _(bits)=└log₂(Δx _(max) −Δx _(min))+1┘

Δx _(n) =x _(n) −x _(n−1) Δx _(min)

[0055] where Δx_(min) and Δx_(max) are the minimum and maximum sampledeltas in the stream and Δx_(bits) contains the number of bits requiredto encode the range Δx_(max) and Δx_(min). To encode the signal, thefirst sample is transmitted using full precision, followed by Δx_(bits)(so the decoder knows how many bits to receive for each delta) andΔx_(min) (so the decoder can recreate the original value of x_(n)). TheΔx_(n) sample deltas are then encoded using Δx_(bits) bits andtransmitted.

[0056] To decode the transmission, the values for Δx_(bits) and Δx_(min)are read, and the strokes are reconstructed using:

x _(n) =x _(n−1) +Δx _(n) +Δx _(min)

[0057] Using this scheme the database was compressed by a factor of 7.43(86.54%). Note that this compression scheme requires all points in astroke to be available for the dynamic range calculation beforecompression can take place, and thus cannot compress a stream of pointswithout buffering. A streamable adaptive delta-encoding scheme could beimplemented using short-term statistics to estimate the optimal numberof bits for the encoding of deltas.

[0058] Improved Adaptive Delta Encoding

[0059] In the compression scheme detailed above, the full-precisionencoding of the initial points of each stroke and the overhead oftransmitting the array sizes comprises a significant fraction of the bitstream. To reduce this overhead, the initial stroke points can be deltaencoded based on their offset from the last point in the previousstroke. Since the majority of these offsets are small (since adjacentstrokes tend to be spatially co-located), but large offsets must beaccommodated without significant overhead, the values are encoded usinga variable-sized numeric value.

[0060] To do this, n bits of the numeric value are transmitted, followedby a single bit flag indicating whether the value is complete (i.e. thevalue is fully defined by the n bits) or more bits are required tocomplete the value. If so, another n bits are transmitted, againfollowed by a completion flag. Using this scheme, small values areencoded with a small number of bits, but large values can be representedwith reasonable efficiency. This same scheme is used to transmit thestroke array and point array sizes. All following compression schemesuse these techniques for initial point and array size encoding unlessotherwise indicated. Using this scheme the test database was compressedby a factor of 8.20 (87.80%).

[0061] Adaptive Huffman Delta Encoding

[0062] While the adaptive delta encoding significantly improved thecompression by encoding the deltas using the minimum number of bitsneeded to encode the entire dynamic range, all deltas in a stroke areencoded using the same number of bits, regardless of their frequency inthe stream. FIG. 5 shows a histogram of the deltas derived from thedigital ink in the training database, together with the correspondingentropy value for the distribution calculated using:$\text{entropy} = {- {\sum\limits_{x \in X}{{p(x)}\log_{2}{p(x)}}}}$

[0063] Clearly, further compression gains should be possible by entropyencoding the delta values, since the delta values are not randomlydistributed. Using variable-length source codes such as thoseconstructed by Huffman coding can often result in the use of fewer bitsper source value than fixed-length codes such as those used above. To dothis, an adaptive Huffman coding scheme (see J. Vitter— “Design andAnalysis of Dynamic Huffman Codes”—Journal of the ACM, 34, pp. 825-845,1987) was used to encode the point deltas. Adaptive Huffman codingdetermines the mapping from source message to code words based on arunning estimate of the source message probabilities. The selected codewords are constantly updated to remain optimal for the currentprobability estimates.

[0064] To encode the digital ink stream, the alphabet for the Huffmancoding was defined as the set of deltas in the range −16 . . . 16, anescape code to represent values outside this range, and an end code toindicate the end of a stroke. The X and Y deltas for each point arecalculated, encoded using the adaptive Huffman encoder, and transmitted.If the absolute value of a delta is greater than 16, an escape code istransmitted, followed by the delta transmitted as a 16-bit value. Whenall points have been transmitted, the end code is sent to indicate theend of a stroke. The signal flow graph for entropy coded deltacompression is given in FIG. 3. Using this scheme the database wascompressed by a factor of 9.66 (89.65%).

[0065] Static Huffman Delta Encoding

[0066] The code words used by adaptive Huffman coding are generateddynamically during encoding. As a result, the bit stream must alsoinclude the uncompressed alphabet entries as they are encountered in thestream. Compressing the deltas using a predefined static Huffman tablegenerated from a set of training data can reduce this overhead, sincetransmission of the table entries will not be required. However, whilethe generated code words will be optimal for compressing the trainingdatabase as a whole, they may not be optimal for arbitrary individualstrokes, resulting in possibly less than optimal compression of thedeltas.

[0067] To encode the digital ink, a Huffman table of delta values wascalculated using the training database, as shown in Table 1 below. Usingthis scheme, the database was compressed by a factor of 9.69 (89.68%), avery slight improvement over the adaptive Huffman encoding scheme. TABLE1 Huffman encoded point deltas −16 10110100011011011110 −151011010001101100 −14 1011010001101111 −13 10110100011010 −12101101000111 −11 1011010000 −10 1101010000 −9 101101001 −8 110101001 −711010101 −6 1101011 −5 111010 −4 10111 −3 11100 −2 1010 −1 010 0 00 1100 2 011 3 1111 4 1100 5 11011 6 111011 7 101100 8 1011011 9 1011010110 1101010001 11 10110100010 12 1011010001100 13 1011010001101110 14101101000110110110 15 10110100011011011111 16 1011010001101101110 escape10110100011011010 end 110100

[0068] Linear Predictive Coding

[0069] Linear prediction (described in, for instance, J. Stein, DigitalSignal Processing—A Computer Science Perspective, John Whiley & SonsInc., 2000) is the process of estimating the next sample of an observedsignal based on the linear interpolation of past samples. Any signalthat is not random is somewhat linearly predictable based on theprevious m samples using:${\overset{\sim}{x}}_{n} = {\sum\limits_{i = 1}^{m}{c_{i}x_{n - i}}}$

[0070] The residual error is the difference between the estimated samplevalue and the observed sample value:$e_{n} = {{{\overset{\sim}{x}}_{n} - x_{n}} = {{\sum\limits_{i = 1}^{m}{c_{i}x_{n - i}}} - x_{n}}}$

[0071] To use linear prediction (LP) for compression, an estimate of thenext sample is found using the predictive model and the previoussamples, and the residual error of the estimate is transmitted. Thus,the more accurate the estimate is, the smaller the residual error willbe resulting in fewer bits required for transmission.

[0072] Simple Linear Prediction

[0073] To perform linear prediction, the set of coefficients {c₁, . . .,c_(m)} must be determined. With m=2 (i.e. the next sample is predictedbased on the previous 2 samples), a simple set of coefficients can bederived by assuming the next sample will equal the previous samplex_(n−1) plus the previous delta x_(n−1)−x_(n−2):

x _(n) =x _(n−1)+(x _(n−1) −x _(n−2))=2x _(n−1) −x _(n−2)

[0074] Thus the coefficients {c₁=2, c₂=−1} are selected. To test andcompare the predictive ability of these coefficients, the mean-squaredresidual error of the X and Y components for the digital ink in thetraining database was calculated, and is shown in Table 2 below.

[0075] Histograms of the X and Y residual components for the linearprediction are given in FIGS. 8 and 9, along with the entropy of thesedistributions. The reduction in entropy of these residual values isapparent when compared to the histograms of the X and Y deltas derivedfrom the same database (see FIGS. 6 and 7), indicating that furthercompression should be possible by using linear prediction.

[0076] A static Huffman table was generated using the residual error ofthe linear prediction estimates of the digital ink in the trainingdatabase. To encode the digital ink, the initial point is transmittedfollowed by the Huffman encoded residual errors of the predicted valuesfor subsequent points. The signal flow graph for this procedure is givenin FIG. 4. Using this scheme the test database was compressed by afactor of 14.30 (93.01%), a significant improvement over the bestdelta-encoding scheme.

[0077] Improved Linear Prediction

[0078] The LP coefficients used above were found using the assumptionthat the next sample will equal the previous sample plus the previousdelta. However, potentially superior coefficients can be derived fromthe training data that more accurately model the bias inherent in thegenerative process of handwriting.

[0079] Given a series of samples {x₁, . . . ,x_(n)}, we need to find thecoefficients c₁ and c₂ that predict x_(i) from previous data pointsx_(i−2) and x_(i−1) with the minimum error in a least squares sense. Todo this we find the coefficients such that the sum-squared error S ofthe predicted values is minimized. An approach for this is derived fromP. Devijver and J.Kittler, Pattern Recognition—A Statistical Approach,Prentice Hall, 1982: $S = {\sum\limits_{i = 3}^{i = n}e_{i}^{2}}$

[0080] where the prediction error is calculated as:

e _(i) =c ₁ x _(n−2) +c ₂ x _(n−1) −x _(n)

[0081] Ideally, S should be zero (i.e. each point is predicted with noerror). If c is the 2-dimensional vector of coefficients:$c = \begin{bmatrix}c_{1} \\c_{2}\end{bmatrix}$

[0082] and x is the n−2 dimensioned vector of observed signal values:$x = \begin{bmatrix}x_{3} \\x_{4} \\\vdots \\x_{n}\end{bmatrix}$

[0083] and A is the 2×(n−2) matrix of the samples used for prediction:$A = \begin{bmatrix}x_{1} & x_{2} \\x_{2} & x_{3} \\\vdots & \vdots \\x_{n - 2} & x_{n - 1}\end{bmatrix}$

[0084] then to solve for S=0 we solve:

Ac=x

[0085] The classical solution:

c=A ⁻¹ x

[0086] is clearly not valid since A⁻¹ does not exist for n#4. For n>4,matrix A is over-determined as the number of equations is greater thanthe number of unknowns. We can find a solution using the pseudo inverseA^(†) (as taught in R. Penrose, “A Generalized Inverse for Matrices”,Proceedings of the Cambridge Philosophical Society, 51, pp. 406-413,1955) of A, which will minimize the error in a least squares sense:

c=A ^(\) x

[0087] The pseudo-inverse A^(\) will always exist even if there is alinear dependence between the columns and rows in A or A is not square.The computation is based on singular value decomposition, and singularvalues less than a specific threshold δ are treated as zero:

δ=n×norm(A)×ε

[0088] where norm(A) is the largest singular value of A, and ε is anumerically small value (set to 1e-16 in the following calculations).

[0089] Using this procedure, the X coefficients {c₁=1.856534,c₂=−0.856130} and Y coefficients {c₁=1.912482, c₂=−0.912907} werederived. Using these coefficients, the mean-squared residual error wasfound to be lower than that of the original coefficients—see Table 2below—indicating points were predicted with greater accuracy using theoptimized coefficients. Using this scheme, the test database wascompressed a factor of 14.35 (93.03%), a slight improvement over theoriginal linear prediction scheme.

[0090] Linear Prediction Using Three Points

[0091] The linear prediction techniques described thus far use only thetwo preceding samples when calculating an estimate for the next point.However, it is possible that using more samples for the prediction ofthe next point will produce a more accurate estimate. To perform linearprediction based on the previous three points, the estimate for the nextsample becomes:

{umlaut over (x)} _(n) =c ₁ x _(n−1) +c ₂ x _(n−2) +c ₃ x _(n−3)

[0092] Using the technique described above to calculate optimalcoefficients, the X coefficients {c₁=1.799363, c₂=−0.721519,c₃=−0.077570} and the Y coefficients {c₁=2.008523, c₂=−1.106576,c₃=0.097674} were derived. The mean-squared residual error was found tobe lower than that of the previous scheme (see Table 2), but using thisscheme did not result in any improvement in the compression factor dueto the quantization of the deltas. TABLE 2 Linear predictionmean-squared residual error Prediction Scheme e_(x) e_(y) e_(x) + e_(y)3.1 Simple Linear Prediction 0.795010 1.150542 1.945552 3.2 ImprovedLinear Prediction 0.736885 1.094879 1.831764 3.3 Linear Prediction UsingThree 0.707117 1.057198 1.764315 Points

[0093] Worst-Case Behaviour

[0094] For a linearly predictive system, the worst-case behaviour occurswhen the direction of the signal changes rapidly, since the estimationprocedure cannot predict the change in direction and may overshoot atthe point of direction change. For digital ink, this corresponds to arapidly drawn scribble with a high frequency of sharp direction changes(as an example, filling in a region with solid ink using a single strokeconsisting of a large number of rapid ballistic up and down movements).

[0095] To test the behavior of the linear prediction compression in theworst-case scenario, a number of digital ink scribbles were created andcompressed using the improved linear prediction scheme, resulting in acompression factor of 11.92 (91.61%). While this is a lower compressionrate than that achieved on the more general ink samples, it stillrepresents a reasonably high level of compression. This is largely dueto the fact that the ballistic strokes generally decelerate to zerovelocity before changing direction, resulting in a small predictionerror at the point of direction change since the velocity (and thus theestimate of the deltas to the next sample) is low.

[0096] The invention includes a number of embodiments, and theirperformance has been evaluated. A summary of the results is given inTable 3 below. The best compression technique, which is based on linearpredictive coding, achieves a compression factor of 14.35 (93.03%) on alarge database of digital ink. The behavior of this compression schemeunder pathological conditions was evaluated and found to produceacceptable results. TABLE 3 Summary of results Compression SchemeCompression Factor % 2.1 Simple Delta Encoding 1.97 49.24 2.2 AdaptiveDelta Encoding 7.43 86.54 2.3 Improved Adaptive Delta Encoding 8.2087.80 2.4 Adaptive Huffman Delta Encoding 9.66 89.65 2.5 Static HuffmanDelta Encoding 9.69 89.68 3.1 Simple Linear Prediction 14.30 93.01 3.2Improved Linear Prediction 14.35 93.03 3.3 Linear Prediction Using ThreePoints 14.35 93.03 3.4 Worst-Case Behavior 11.92 91.61

[0097] The invention may also be said broadly to consist in the parts,elements and features referred to or indicated in the specification ofthe application, individually or collectively, in any or allcombinations of two or more of said parts, elements or features, andwhere specific integers are mentioned herein which have knownequivalents in the art to which the invention relates, such knownequivalents are deemed to be incorporated herein as if individually setforth.

[0098] Although the preferred embodiment has been described in detail,it should be understood that various changes, substitutions, andalterations can be made herein by one of ordinary skill in the artwithout departing from the scope of the present invention ashereinbefore described and as hereinafter claimed.

1. A method of compressing a digital ink input including a sequence ofstrokes, each stroke being represented as a series of digital wordsrepresenting x and y co-ordinates, the compressed digital ink dataincluding, for each stroke, at least one reference co-ordinate expressedin absolute terms, with subsequent co-ordinates being expressed in termsof an offset from a co-ordinate, estimated using linear prediction, suchthat a given co-ordinate may be estimated on the basis of the previous mco-ordinates as:${\overset{\sim}{\alpha}}_{n} = {\sum\limits_{i = 1}^{m}{c_{i}\alpha_{n - i}}}$

where c_(i) are coefficients selected to model characteristics of thedigital ink, and a represents either an x or a y co-ordinate.
 2. Amethod as claimed in claim 1 wherein m is 2, and a given co-ordinate maybe defined: α_(n) =C ₁α_(n−1) +C ₂α_(n−2)
 3. A method as claimed inclaim 2 wherein C₁>0 and C₂<0.
 4. A method as claimed in claim 3wherein: 1≦C₁≦3 and −2≦C₂≦1
 5. A method as claimed in claim 4 whereinC₁=2 and C₂=−1.
 6. A method as claimed in any one of claims 1 to 4wherein the coefficient values (C_(i)) for x co-ordinates are differentto the coefficients for y co-ordinates.
 7. A method as claimed in claim6 wherein for x co-ordinates: C₁=1.857 C₂ =−0.856, and for yco-ordinates: C₁=1.912 C₂=−0.913
 8. A method as claimed in claim 1wherein m is 3, and a given co-ordinate may be defined: {umlaut over(α)}_(n) =c ₁α_(n−1) +c ₂α_(n−2) +c ₃α_(n−3)
 9. A method as claimed inclaim 8 wherein C₁>0 and C₂<0 and C₃<1.
 10. A method as claimed in claim8 or 9 wherein the coefficient values (C_(i)) for x co-ordinates aredifferent to the coefficients for y co-ordinates.
 11. A method asclaimed in claim 10 wherein for x co-ordinates: C₁=1.799 C₂=−0.722C₃=−0.078, and for y co-ordinates: C₁=2.009 C₂=−1.107 C₃=−0.098